package CtrlLayer;
import ModelLayer.*;

/**
 * Write a description of class KundtCtrl here.
 * 
 * @author Zohdi Al-Ghandour     
 * @version 05-12-2014
 */
public class KundeCtrl
{
    // instance variables - replace the example below with your own
    private KundeContainer kundeContainer;
    private Kunde k;

    
    public KundeCtrl()
    {
        kundeContainer = kundeContainer.getInstance();
    }
   
    public void addKunde(String navn, String address, String tlf, double rabat)
    {
       kundeContainer.addKunde(navn,address,tlf,rabat);
    }
    
    public boolean setKunde(String nr, String navn, String address, String tlf, double rabat)
    {
        return kundeContainer.setKunde(nr,navn,address,tlf,rabat);
    }
    
    public boolean removeKunde(String nr)
    {
        boolean found = false;
        if(kundeContainer.removeKunde(nr))
        {
            found = true;
        }
        return found;
    }
    
    public Kunde findKunde(String nr)
    {
        return kundeContainer.findKunde(nr);
    }
}
